import request from '@/utils/request'

export function getTreeData(params,type) {
    return request({
        url: '/app/dir/getTreeData',
        method: 'get',
        params: params,
		type:type
    })
}


export function save(data) {
    return request({
        url: '/app/dir/save',
        method: 'post',
        data: data
    })
}


export function dirIsLeaf(type) {
    return request({
        url: '/app/dir/dirIsLeaf',
        method: 'get',
		type:type
    })
}


export function del(params) {
    return request({
        url: '/app/dir/delete',
        method: 'delete',
        params: params
    })
}

export function update(data){
    return request({
        url:'/app/dir/update',
        method:'put',
        data:data
    })
}

export function moveTree(params){
    return request({
        url:'/app/dir/moveTree',
        method:'put',
        params:params
    })
}

export function queryById(params,type){
    return request({
        url:'/app/dir/queryById',
        method:'get',
        params:params,
		type:type
    })
}